package cn.itcast.com.day08;

public class demo {
    public static void main(String[] args) {
        Condition condition = new Condition();
        condition.testOverride();
    }
}
class ConditionFather{

    void accessCondition(){
        System.out.println("father");
    }
    //定义测试方法
    public void testOverride(){
        accessCondition();
    }
}

class Condition extends ConditionFather{
    protected void accessCondition(){
        System.out.println("son");
    }
}